package com.ZeroCarbon.prefix;

import cn.hutool.core.lang.UUID;

/**
 * MySQL的UUID前缀
 *
 * @since 2024-10-11
 */
public class MySqlKey {
    /**
     * 记录前缀
     */
    public static final String POST_PREFIX = "record_";

    /**
     * 评论前缀
     */
    public static final String COMMENT_PREFIX = "comment_";

    /**
     * 回复评论前缀
     */
    public static final String REPLY_PREFIX = "reply_";

    /**
     * 商家身份前缀
     */
    public static final String SHOP_PREFIX = "shop_";

    /**
     * 商品前缀
     */
    public static final String GOOD_PREFIX = "good_";

    /**
     * 地址前缀
     */
    public static final String ADDRESS_PREFIX = "address_";

    /**
     * 订单前缀
     */
    public static final String ORDER_PREFIX = "order_";

    /**
     * 随机生成id
     *
     * @since 2025-2-13
     */
    public static String generateId(String type) {
        return type + UUID.randomUUID();
    }
}
